﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace OnlineEducation.Data.Entities
{
    /// <summary>
    /// 考试
    /// </summary>
    public class CourseExam : EntityBase
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [ForeignKey("Course")]
        public int CourseId { get; set; }
        public Course Course { get; set; }


        [ForeignKey("Student")]
        public int StudentId { get; set; }

        public ApplicationUser Student { get; set; }


        [Display(Name = "考试答案")]
        [StringLength(5000)]
        [Required]
        public string AnswerContent { get; set; }

        [Display(Name = "等级/分数")]
        [StringLength(100)]
 
        public string ExamResult { get; set; }

        public bool Passed { get; set; }


    }
}
